<template>
    <div class="accountManage">
        <div class="container">
            <el-tabs v-model="activeName" class="pl30">
                <el-tab-pane label="账号列表" name="accountList" v-if="menuAuthCodes.includes('M49')"></el-tab-pane>
                <el-tab-pane label="角色权限" name="rolePermiss" v-if="menuAuthCodes.includes('M50')"></el-tab-pane>
            </el-tabs>
            <component :is="activeName"></component>
        </div>
    </div>
</template>

<script>
import accountList from "./accountList/index.vue";
import rolePermiss from "./rolePermiss/index.vue";
import blank from "@/components/Blank";
export default {
    name: "accountManage",
    data() {
        return {
            activeName: "accountList"
        }
    },
    created() {
        if (this.menuAuthCodes.includes('M49')) {
            this.activeName = "accountList";
        } else if (this.menuAuthCodes.includes('M50')) {
            this.activeName = "rolePermiss";
        } else {
            this.activeName = "blank";
        }
    },
    components: {
        accountList, rolePermiss, blank
    }
}
</script>

<style lang="scss">
.accountManage {
    height: 100%;
    .container {
        height: 100%;
    }
}
</style>